package com.dainel.mybatis.demo.bean;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.persistence.*;
import java.util.List;

/**
 * 议题(topic)
 * Created  2021/4/6.
 */
@Entity
@Table(name = "gs_meeting_topic")
@TableName("gs_meeting_topic")
public class TopicBean extends BaseBean {

    private static final long serialVersionUID = 1L;

    @Id
    @TableId("topic_key")
    @Column(name = "topic_key", columnDefinition = "varchar(64) comment '主键5'")
    private String topicKey;          //议程(日程)id

    @TableField("meeting_key")
    @Column(name = "meeting_key", columnDefinition = "varchar(64) comment '所属日程key'")
    private String meetingKey;

    @TableField("topic_name")
    @Column(name = "topic_name", columnDefinition = "varchar(1024) comment '议题名称'")
    private String topicName;

    @TableField("topic_content")
    @Column(name = "topic_content", columnDefinition = "TEXT comment '议题内容'")
    private String topicContent;

    @TableField("sort")
    @Column(name = "sort", columnDefinition = "int(8) comment '排序用'")
    private int sort;           // 排序用

    @TableField("topic_status")
    @Column(name = "topic_status", columnDefinition = "int(3) default 1 comment '议题的状态，跟随TopicStatus，1未开始、3已完成'")
    private int topicStatus = 1;        // 表决的状态，跟随TopicStatus

    /****************************************************************************
     *                               为无纸化加的属性
     * ****************************************************************************/

    /** 单表决的参数 start **/

    /**  单表决的参数 end **/

    /** 多表决的参数 start **/

    /** 多表决的参数 end **/

    /** 标语 start **/


    @TableField("slogan")
    @Column(name = "slogan", columnDefinition = "text comment '标语内容（json格式）'")
    private String slogan;

    /**
     * 标语 end
     **/

    @TableField(exist = false)
    @Transient
    private int fileCount;         // 文件个数

    @TableField(exist = false)
    @Transient
    private int voteCount;         // 表决个数

    /**
     * @deprecated 议题没有具体的开始时间，使用时长代替
     */
    @Transient
    @Deprecated
    @TableField(exist = false)
    @Column(name = "begin_time", columnDefinition = "bigint comment '开始时间段，从0点开始算起，单位毫秒'")
    private Long beginTime;

    /**
     * @deprecated 议题没有具体的结束时间，使用时长代替
     */
    @Transient
    @Deprecated
    @TableField(exist = false)
    @Column(name = "end_time", columnDefinition = "bigint comment '结束时间段，从0点开始算起，单位毫秒'")
    private Long endTime;


    @TableField("delay_time")
    @Column(name = "delay_time", columnDefinition = "bigint comment '结束时间段，从0点开始算起，单位毫秒'")
    private Long delayTime;


    @TableField("topic_type")
    @Column(name = "topic_type", columnDefinition = "varchar(16) comment '议题类型'")
    private String topicType;

    @TableField("speaker")
    @Column(name = "speaker", columnDefinition = "varchar(64) comment '演讲人员'")
    private String speaker;


    @TableField(exist = false)
    @Transient
    private List<String> userInfoGroupKeys;
}

